package com.heima.article.task;

import com.heima.article.service.IHotArticleService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HotArticleTask {
    @Autowired
    IHotArticleService hotArticleService;

    @XxlJob("computerHotArticleJob")
    public ReturnT<String> computerHotArticleJob(String param) throws Exception{
        // 调用热点文章计算服务
        hotArticleService.countHot();
        return ReturnT.SUCCESS;
    }
}
